package com.pratik.gedcom.parser.impl;

import java.io.File;
import java.util.List;

import com.pratik.gedcom.builder.interfaces.GedcomBuilder;
import com.pratik.gedcom.domain.Gedcome;
import com.pratik.gedcom.fileutil.interfaces.GedcomFileUtil;
import com.pratik.gedcom.parser.interfaces.GedcomParser;


public class GedcomParserImplemetation implements GedcomParser{

	private GedcomBuilder gedcomBuilder;
	private GedcomFileUtil gedcomFileUtil;

	@Override
	public Gedcome getGedcome(File gedcomFile) {
		List<String> tokenList = gedcomFileUtil.getTokenList(gedcomFile);
		return gedcomBuilder.build(tokenList);
	}

	public void setGedcomBuilder(GedcomBuilder gedcomBuilder) {
		this.gedcomBuilder=gedcomBuilder;

	}

	public void setGedcomFileUtil(GedcomFileUtil gedcomFileUtil) {
		this.gedcomFileUtil=gedcomFileUtil;
	}

}
